package com.cj.controller;

import com.cj.po.DClass;
import com.cj.po.PageInfo;
import com.cj.service.ClassStudentListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 班级控制器类
 */
@Controller
public class ClassStudentListController {

    @Autowired
    private ClassStudentListService classStudentListService;

    @RequestMapping(value = "/findClassStudent")
    public String findClassStudent(Integer c_classid,String c_classname, Integer pageIndex, Integer pageSize, Model model) {

        // 获取分页信息
        PageInfo<DClass> pi = classStudentListService.findPageInfo(c_classname, c_classid,
                pageIndex, pageSize);
        model.addAttribute("cs", pi);
//        model.addAttribute("c_classname", c_classname);
        return "Class_Studentlist"; // 返回视图
    }
}
